//# sourceURL=http://uMapApp/UI/IconMenu/IconMenuSlide
define([
    "mhjs/mhjs",
    "./IconMenuSlideButtons",
    "./IconMenuSlideTabs"
], function (
    mhjs,
    IconMenuSlideButtons,
    IconMenuSlideTabs
) {

    function IconMenuSlide(option) {
        var _this = this;
        _this.dom = $("<div class='iconMenuSlide'></div>");

        if (option) {

            if (option.buttons) {
                _this.buttons = option.buttons;
            } else if (option.tabs) {
                _this.tabs = option.tabs;
            }

        }


    }

    var _class = IconMenuSlide;

    mhjs.Inherit(_class, mhjs.Div);

    Object.defineProperties(_class.prototype, {
        "buttons": {
            set: function (buttons) {

                if (buttons) {
                    var _this = this;
                    _this._buttons = [];
                    _this.dom.empty();
                    var iconMenuSlideButtons = new IconMenuSlideButtons(buttons);
                    iconMenuSlideButtons.parent = _this;
                    _this._buttons.push(iconMenuSlideButtons);
                    _this.dom.append(iconMenuSlideButtons.dom);
                }

            },
            get: function () {
                return this._buttons;
            }
        },
        "tabs"   : {
            set: function (tabs) {
                var _this = this;
                _this._tabs = [];
                _this.dom.empty();
                var iconMenuSlideTabs = new IconMenuSlideTabs(tabs);
                iconMenuSlideTabs.parent = _this;
                _this._tabs.push(iconMenuSlideTabs);
                _this.dom.append(iconMenuSlideTabs.dom);

            },
            get: function () {
                return this._tabs;
            }
        }
    });

    return _class;

});